package com.lzc.order.controller;


import com.lzc.order.client.ProductClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.HashMap;
import java.util.Map;

@RestController
public class OrderController {

    @Autowired
    private ProductClient productClient;

    @GetMapping("/orders")
    public Object orders() {
        Map<String, Object> map = new HashMap<>();
        map.put("code",0);
        map.put("msg","从商品服务中获取到的商品信息");
        map.put("data",productClient.products());
        return map;
    }
}
